#ifndef BANKACCOUNT_HH
#define BANKACCOUNT_HH
#include "IAccount.hh"
#include "Transaction.hh"
#include <vector>
#include <string>
//Serves as a base or utility class (if present) to encapsulate shared properties and behaviors of all bank account types.
namespace Bank {
// Abstract base class for both Checking and Savings accounts
    class Account : public IAccount {
    protected:
        std::string accountId;
        std::string ownerName;
        double balance;
        std::vector<Transaction> transactions;

    public:
        // Constructor
        Account(const std::string& id, const std::string& name, double initialBalance = 0.0);
        std::string getAccountId() const override;
        std::string getOwnerName() const override;
        double getBalance() const override;
        void recordTransaction(const Transaction& transaction);
        const std::vector<Transaction>& getTransactions() const;
        virtual bool transferTo(IAccount* toAccount, double amount, const std::string& note = "") override = 0;
        void displayInfo() const override;
        std::string generateReport() const;
    };
} 
#endif